package net.qiqb.core.executing.definition;

import cn.hutool.core.lang.Assert;
import net.qiqb.core.domain.definition.DomainDefine;
import net.qiqb.core.executing.annotation.AggregateObjectPostProcessor;

import java.util.List;

public class CommandDefine extends BaseDefine {

    private String commandClassName;

    private final DomainDefine domainDefine;

    private List<AggregateObjectPostProcessor> obtainAggregateObjectPostProcessors;

    public CommandDefine(String name, DomainDefine domainDefine) {
        super(name);
        Assert.notNull(domainDefine, "命令必须明确所操作的聚合对象");
        this.domainDefine = domainDefine;
    }

    public String getDomainClassName() {
        return domainDefine.getName();
    }

    public DomainDefine getDomainDefine() {
        return domainDefine;
    }

    public List<AggregateObjectPostProcessor> getObtainAggregateObjectPostProcessors() {
        return obtainAggregateObjectPostProcessors;
    }
}
